<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
	</head>
	<body>
		<div id="app">
			<input v-model="mzb"/>
	
			<p>长度为:{{getLength()}}</p>
		</div>
		
		  
		<script>
		new Vue({
		  el: '#app',
		  data: {
			mzb:"",
		   length:0
		  },
		  methods:{
			  getLength:function(){
				  return this.length=this.mzb.length ;
			  }
		  }
		})
		</script>
	</body>
</html>
